
#include "instruction.h"



///////////////////////////////////////////////////  INSTRUCTION EXCEPTION  ///////////////////////////////////////////////////
InstructionException::InstructionException( void ) {
  return;
}

InstructionException::InstructionException( const std::string& file, const unsigned long& line, const std::string& extra ) {
  char* foo = new char[extra.size()+100];
  sprintf( foo, "Muscl instruction exception %s line %lu: %s\n", file.c_str(), line, extra.c_str() );
  setMessage( foo );
  return;
}

InstructionException::InstructionException( const InstructionException& ref ) {
  setMessage( ref.getMessage() );
  return;
}

InstructionException::~InstructionException( void ) {
  return;
}



///////////////////////////////////////////////////  INSTRUCTION CLASS  ///////////////////////////////////////////////////
Instruction::Instruction( void ) {
  type( INSTRUCTION_TYPE_NONE );
  return;
}

Instruction::Instruction( const Instruction& ref ) {
  copy( ref );
  return;
}

Instruction::~Instruction( void ) {
  return;
}

Instruction& Instruction::operator = ( const Instruction& ref ) {
  copy( ref );
  return *this;
}

void Instruction::copy( const Instruction& ref ) { // private
  type( ref.type() );
  return;
}

